[IA64] cleanup of tlb.c
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 21 Mar 2006 16:55:04 +0000 (09:55 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 21 Mar 2006 16:55:04 +0000 (09:55 -0700)
#if 0 unused code for tlb management.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/linux-xen/setup.c
xen/arch/ia64/linux-xen/smp.c
xen/arch/ia64/linux-xen/tlb.c
xen/include/asm-ia64/linux-xen/asm/tlbflush.h

index 92b0b8cb11b62761d111ef788c8e94771122a4f1..ce5dee42ddfbaf7e4274a46f3f8cbeb6e4b252c7 100644 (file)
@@ -765,8 +765,10 @@ cpu_init (void)
 {
        extern void __devinit ia64_mmu_init (void *);
        unsigned long num_phys_stacked;
+#ifndef XEN
        pal_vm_info_2_u_t vmi;
        unsigned int max_ctx;
+#endif
        struct cpuinfo_ia64 *cpu_info;
        void *cpu_data;
 
@@ -874,6 +876,7 @@ cpu_init (void)
        normal_xtp();
 #endif
 
+#ifndef XEN
        /* set ia64_ctx.max_rid to the maximum RID that is supported by all CPUs: */
        if (ia64_pal_vm_summary(NULL, &vmi) == 0)
                max_ctx = (1U << (vmi.pal_vm_info_2_s.rid_size - 3)) - 1;
@@ -886,6 +889,7 @@ cpu_init (void)
                if (cmpxchg(&ia64_ctx.max_ctx, old, max_ctx) == old)
                        break;
        }
+#endif
 
        if (ia64_pal_rse_info(&num_phys_stacked, NULL) != 0) {
                printk(KERN_WARNING "cpu_init: PAL RSE info failed; assuming 96 physical "
index 53bfa861249d3526c2b2dcc4567cfd77c4df03b2..fb84bb5b82658a4b21e3de5f36b305969d4114d8 100644 (file)
@@ -291,17 +291,13 @@ smp_flush_tlb_all (void)
        on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
 }
 
+#ifndef XEN
 void
 smp_flush_tlb_mm (struct mm_struct *mm)
 {
        preempt_disable();
        /* this happens for the common case of a single-threaded fork():  */
-#ifdef XEN
-       if (likely(mm == current->domain->arch.mm
-                  && atomic_read(&mm->mm_users) == 1))
-#else
        if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1))
-#endif
        {
                local_finish_flush_tlb_mm(mm);
                preempt_enable();
@@ -318,6 +314,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
         */
        on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
 }
+#endif
 
 /*
  * Run a function on another CPU
index f6e53d5569c3ba62784023f5101ff4d61ed9e953..1547b57e52ff705cd492cb826e5044f5a0166906 100644 (file)
@@ -28,6 +28,7 @@ static struct {
        unsigned long max_bits; /* log2() of largest supported purge page-size */
 } purge;
 
+#ifndef XEN
 struct ia64_ctx ia64_ctx = {
        .lock =         SPIN_LOCK_UNLOCKED,
        .next =         1,
@@ -43,9 +44,6 @@ DEFINE_PER_CPU(u8, ia64_need_tlb_flush);
 void
 wrap_mmu_context (struct mm_struct *mm)
 {
-#ifdef XEN
-printf("wrap_mmu_context: called, not implemented\n");
-#else
        unsigned long tsk_context, max_ctx = ia64_ctx.max_ctx;
        struct task_struct *tsk;
        int i;
@@ -86,8 +84,8 @@ printf("wrap_mmu_context: called, not implemented\n");
                put_cpu();
        }
        local_flush_tlb_all();
-#endif
 }
+#endif /* XEN */
 
 void
 ia64_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbits)
@@ -133,12 +131,10 @@ local_flush_tlb_all (void)
 }
 EXPORT_SYMBOL(local_flush_tlb_all);
 
+#ifndef XEN
 void
 flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 {
-#ifdef XEN
-printf("flush_tlb_range: called, not implemented\n");
-#else
        struct mm_struct *mm = vma->vm_mm;
        unsigned long size = end - start;
        unsigned long nbits;
@@ -170,9 +166,9 @@ printf("flush_tlb_range: called, not implemented\n");
 # endif
 
        ia64_srlz_i();                  /* srlz.i implies srlz.d */
-#endif
 }
 EXPORT_SYMBOL(flush_tlb_range);
+#endif
 
 void __devinit
 ia64_tlb_init (void)
index 7397882c0f8323337935b4e863248158cd1fa9c5..1bbaf9ec38b935b5d144ff73f74fdf527cb5d539 100644 (file)
@@ -33,6 +33,7 @@ extern void local_flush_tlb_all (void);
 # define flush_tlb_all()       local_flush_tlb_all()
 #endif
 
+#ifndef XEN
 static inline void
 local_finish_flush_tlb_mm (struct mm_struct *mm)
 {
@@ -109,6 +110,8 @@ flush_tlb_pgtables (struct mm_struct *mm, unsigned long start, unsigned long end
 
 
 #define flush_tlb_kernel_range(start, end)     flush_tlb_all() /* XXX fix me */
+#endif /* XEN */
+
 #ifdef XEN
 extern void flush_tlb_mask(cpumask_t mask);
 #endif